<!--
 * @Author: JiraiyaChen 979526234@qq.com
 * @Date: 2025-06-23 13:49:37
 * @LastEditors: JiraiyaChen 979526234@qq.com
 * @LastEditTime: 2025-06-23 14:19:48
 * @Description: 评标报告查看  &&  评标汇总
-->

<template>
  <el-table height="500px" :data="tableData" stripe border tooltip-effect="light">
    <el-table-column label="单位名称" min-width="200" prop="supplierName" />
    <el-table-column v-for="(column, index) in columnList" :key="column.judgeId" :label="column.judgeName" prop="score">
      <template #header="header">
        <div class="flex items-center justify-center">
          <el-button type="primary" link @click="judgeInfo(column)">{{ header.column.label }}</el-button>
        </div>
      </template>
      <el-table-column label="主观分" width="120">
        <template #default="scope">
          {{ scope.row['judgeScoreList'][index]['subjectiveScore'] }}
        </template>
      </el-table-column>
      <el-table-column prop="objectiveScore" label="客观分" width="120">
        <template #default="scope">
          {{ scope.row['judgeScoreList'][index]['objectiveScore'] }}
        </template>
      </el-table-column>
    </el-table-column>
    <el-table-column label="价格分" width="100" prop="priceScore" />
    <el-table-column label="总分" width="100" prop="totalScore" />
  </el-table>
</template>

<script setup lang="ts">
defineProps<{
  tableData: any[]
  columnList: any[]
}>()
const emit = defineEmits<{
  (e: 'judgeInfo', column: any): void
}>()
const judgeInfo = (column: any) => {
  emit('judgeInfo', column)
}
</script>
